package org.linlinjava.litemall.db.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.domain.*;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

public interface TagMapper {

    List<TagVo> selectByExample(@Param("name") String name);

    @Insert("insert into litemall_store_tag_mapping(store_id,tag_id) values(#{storeId},#{tagId})")
    int insertStoreTagMapping(@Param("storeId") Integer storeId, @Param("tagId")String tagId);

    List<TagVo> selectByStoreId(@Param("storeId")Integer storeId);

    @Delete("delete from litemall_store_tag_mapping where store_id = #{storeId}")
    int deleteByStoreId(@Param("storeId") Integer storeId);
}
